#pragma once

#ifndef DLL_OBJECT_H
#define DLL_OBJECT_H
#endif

using namespace std;

class TNode
{
private:
	TNode* _next;
	TNode* _prev;
	TNode* _parent;
	TNode* _childH;
	TNode* _childT;
	int _nbchildren;
	string _object;
	~TNode(){};
	void TNode::_DeleteSub();
	void UnLink();
	
public:
	TNode();
	TNode(const char* obj, TNode* parent);
	void Delete();
	TNode* Copy(TNode*Parent);
	int CountChildren(){return _nbchildren;};
	TNode* After(){return _next;};
	TNode* Before(){return _prev;};
	TNode* First(){return _childH;};
	TNode* Last(){return _childT;};
	TNode* Get(int id);
	TNode* Find(const char* obj);
	TNode* Parent(){return _parent;};
	int SetParent(TNode* parent);
	const char* Object(){return _object.c_str();};
	void SetObject(const char* object){_object=object;};
};

